import os
import json

from app.tools.file import read_file

site_config_file_name = "site_config.json"
site_config_json = json.loads(read_file(site_config_file_name))

class DbConfig(object):
    DB_USER = "root"
    DB_PASSWORD = "123456"
    DB_HOST = "127.0.0.1"
    DB_PORT = 3306
    DB_DATABASE = "blog_123"

class EmailConfig:
    EMAIL_HOST = "smtp.qq.com"
    EMAIL_PORT = 587
    EMAIL_USER = "948258209@qq.com"
    EMAIL_PASSWORD = "ekvinizlnzkmbdfh"



class Config(DbConfig, EmailConfig):
    STATIC_PATH = os.path.join('app', 'static')
    STATIC_URL = "/static/"

    IMAGE_EXT = ["jpg", "png", "gif", "jpeg"]
    VIDEO_EXT = ["mp4", "avi"]


    DEBUG = False
    SECRET_KEY = "2233"



class DevConfig(Config):
    DEBUG = True
